def pertenece(s, C):
    return any([all(s==x) for x in C])

def PrintLista(l):
   print ' '.join([str(x) for x in l])

def PrintArray(a):
   print ' '.join([str(x.item(0)) for x in a])

def ListToString(a):
   return '\n'.join([str(x) for x in a])

def ListToStringLine(a):
   return ' '.join([str(x) for x in a])

def ArrayToString(a):
   return '\n'.join([str(x.item(0)) for x in a])

def ArrayToStringLine(a):
   return ' '.join([str(x.item(0)) for x in a])

def ArrayToBinary(a):
	return ''.join([str(int(x.item(0)>0)) for x in a])
